<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>朴与素连锁店管理信息系统</title>
<%@ include file="../../common/Style.jsp"%>

<script>
	$(document).ready(function() {
		parent.$.messager.progress('close');

	});
	/** 根据品牌查询库存 */
	function getLevelOne(storeId) {
		$.messager.progress({
			title : '提示',
			text : '数据处理中，请稍后....'
		});
		window.location.href = "headqInventoryFlowJSPAction!getLevelOneCurrentInventory?formBean.rptTypeId=1&formBean.storeId="
				+ storeId;
	}

	/** 根据货品类型查找 */
	function getLevelOneByCategoryId(chainId) {
		$.messager.progress({
			title : '提示',
			text : '数据处理中，请稍后....'
		});
		window.location.href = "headqInventoryFlowJSPAction!getLevelOneCurrentInventory?formBean.rptTypeId=2&formBean.storeId="
				+ chainId;
	}
</script>
</head>
<body>

	<s:form
		action="/action/headqInventoryFlowJSPAction!preGetCurrentInventory"
		method="POST" name="chainListForm" id="chainListForm" theme="simple">
		<table width="70%" align="center" class="OuterTable">
			<tr>
				<td>

					<table width="100%" border="0">
						<tr class="PBAOuterTableTitale">
							<td height="50" colspan="3">总部当前库存</td>
						</tr>
						<tr>
							<td colspan="3">
								<!-- table to display the staff information -->
								<table width="100%" align="left" class="OuterTable"
									id="org_table">
									<tr class="PBAInnerTableTitale" align='left'>
										<th width="40" height="25">No.</th>
										<th width="30"></th>
										<th width="160">仓库名称</th>
										<th width="160">品牌查看</th>
										<th width="160">类别查看</th>
									</tr>

									<s:iterator value="uiBean.stores" status="st" id="stores">
										<tr class="InnerTableContent"
											<s:if test="#st.even">style='background-color: rgb(255, 250, 208);'</s:if>>
											<td><s:property
													value="#st.index +1 + formBean.pager.firstResult" /></td>
											<td><s:property value="#stores.name" /></td>
											<td><s:property value="#stores.comment" /></td>
											<td><a
												href='javascript:getLevelOne(<s:property value="#stores.id"/>)'><img
													src='<%=request.getContextPath()%>/conf_files/web-image/editor.gif'
													border='0' /></a>&nbsp;&nbsp;
											<td><a
												href='javascript:getLevelOneByCategoryId(<s:property value="#stores.id"/>)'><img
													src='<%=request.getContextPath()%>/conf_files/web-image/editor.gif'
													border='0' /></a>&nbsp;&nbsp;</td>
											</td>
										</tr>
									</s:iterator>
									<s:if test="uiBean.chainStores.size == 0">
										<tr class="InnerTableContent">
											<td colspan="5">没有记录</td>
										</tr>
									</s:if>
									<s:else>
										<tr class="InnerTableContent">
											<td colspan="5"><div id="pageNav"></div></td>
										</tr>
									</s:else>
								</table>
							</td>

						</tr>
						<tr class="InnerTableContent">
							<td height="4" colspan="5"><hr width="100%" color="#FFCC00" /></td>

						</tr>
					</table>
				</td>
			</tr>
		</table>
	</s:form>
</body>

</html>